
package trim.differentmaterials.generator.columns;

import trim.differentmaterials.coefficients.*;

/**
 *
 * @author Podorov Alexander
 */

public class Column implements Comparable<Column>
{    
    protected int[] items;
    protected double estimation;
    protected Coefficient coefficient;

    public Column(int[] items, double estimation, Coefficient coefficient)
    {       
        this.items = items;
        this.estimation = estimation;
        this.coefficient = coefficient;
    }

    public Coefficient getCoefficient()
    {
        return coefficient;
    }

    public double getEstimation()
    {
        return estimation;
    }

    public int compareTo(Column colomn)
    {
        if (this.estimation == colomn.estimation)
        {
            return 0;
        }
        else
        {
            if (this.estimation > colomn.estimation)
            {
                return - 1;
            }
            else
            {
                return 1;
            }
        }
    }

    public int[] getItems()
    {
        return items;
    }
}
